﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/web.master" CodeBehind="cdc_list_parameter.aspx.cs" Inherits="Shuba.Web.cdc.cdc_list_parameter" %>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Header1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">

    <script type="text/javascript">
		function PrintThis() {
			var txt = document.getElementById('<%= txtSearch.ClientID %>').value;
			window.open("holiday_list_excel.aspx?txtSearch=" + txt);
		}
		 function CheckAll()
        {
            var checkVal;
            if(document.all("ButSelect").value == "Check All")
            {
                checkVal = true;
                document.all("ButSelect").value = "Un-Check All";
            }else
            {
                checkVal = false;
                document.all("ButSelect").value = "Check All";
            }
            
            for (var n = 0; n < document.forms[0].length; n++) 
            {
                elm = document.forms[0].elements[n];
                if (elm.type == 'checkbox') 
                {
                    elm.checked = checkVal;
                }
            }
        }
    </script>
    
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
            <td class="text bg_content" bgcolor="#FFFFFF" align="center">
                <p>
                    &nbsp;</p>
                <table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="38%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                        </td>
                        <td class="title_back" align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="border_left bg_subtitle_white">&nbsp;</td>
                        <td class="border_right bg_subtitle" align="right">
                            Customer Name / PRN&nbsp;<asp:TextBox ID="txtSearch" CssClass="text" runat="server" Width="250px"></asp:TextBox>&nbsp;
                            <asp:Button ID="btnSearch" CssClass="buttonsmall" runat="server" Text="Search" OnClick="btnSearch_Click" />&nbsp;&nbsp;
                            <asp:LinkButton ID="btnReplacement" runat="server" PostBackUrl="cdc_replacement_operator.aspx" CssClass="black">Replace</asp:LinkButton>&nbsp;&nbsp;
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="border" colspan="2">
                        <asp:Panel ID="ApprovalPnl" Visible="true" runat="server">
                            <table class="black" border="0" width="100%" cellspacing="0" cellpadding="0">                                
                                <tr>
                                    <td class="border">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <cc:SHUBAGrid ID="gvList1" runat="server" AutoGenerateColumns="true" Width="100%"
                                            DataKeyNames="PROSPECT_ID"
                                            AllowPaging="True" PageSize="20"
                                            OnPageIndexChanging="gvList1_PageIndexChanging" 
                                            AllowSorting="True" OnSorting="gvList1_Sorting">
                                            <Columns>
                                              <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" HeaderStyle-Width="12%" ItemStyle-HorizontalAlign="Center">
                                                    <HeaderTemplate>
                                                        <input type=button id="ButSelect" name="ButSelect" value="Check All" class="button" onclick="CheckAll()">
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chkItemSelect" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>                                                    
                                            </Columns>
                                            <PagerSettings Mode="Numeric" Visible="true" />
                                        </cc:SHUBAGrid>
                                    </ContentTemplate>
                                    <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="gvList1" EventName="PageIndexChanging"/>
                                    <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                                    <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click"/>
                                    </Triggers>
                                    </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <br />
                                        <asp:Button ID="btnSubmit1" CssClass="button" runat="server" Text="Submit" OnClick="btnSubmit1_Click" OnClientClick="return confirm('Are you sure, you want to process changes to the selected record(s) ?')" />
                                        <br />
                                        <br />
                                        <br />                                        
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="border" colspan="2">
                        <asp:Panel ID="ApprovalPnl2" Visible="true" runat="server">
                            <table class="black" border="0" width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td class="border">
                                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="true" Width="100%"
                                    DataKeyNames="PROSPECT_ID" AllowPaging="True" PageSize="20" 
                                    OnPageIndexChanging="gvList_PageIndexChanging" 
                                    AllowSorting="True" OnSorting="gvList_Sorting">
                                    <Columns>
                                        <asp:TemplateField HeaderStyle-Width="12%" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" HeaderText="STATUS">
                                            <ItemTemplate>
                                                <asp:DropDownList SelectedValue='<%# Bind("IS_BI_CHECKING") %>' CssClass="text" ID="ddlStatus" runat="server">
                                                <asp:ListItem Text="" Value="-1"></asp:ListItem>
                                                <asp:ListItem Text="Belum" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="Selesai" Value="1"></asp:ListItem>
                                                <asp:ListItem Text="Urgent" Value="2"></asp:ListItem>
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerSettings Mode="Numeric" Visible="true" />
                                    <EmptyDataTemplate>
                                        <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                                    </EmptyDataTemplate>
                                </cc:SHUBAGrid>
                                    </ContentTemplate>
                                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging"/>
                        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                        <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click"/>
                        </Triggers>
                                    </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                        <td align=left><br />                            
                            <asp:Button ID="btnSubmit" Text="Submit" runat="server" CssClass="button" OnClick="btnSubmit_Click" />
                        </td>
                    </tr>
                            </table>
                        </asp:Panel>
                        </td>
                    </tr>
                </table>
                
                <br />
			    <!-- Error Message -->
			    <table runat=server visible=false id="ErrBox" border="0" width="100%" cellspacing="0" cellpadding="2">
			    <tr>
			    <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
			    </tr>
			    </table>
			    <!-- End Of Error Message -->
			    
			    <p>&nbsp;</p>
			    
            </td>
        </tr>
    </table>
</asp:Content>